Skip to content

Phase 5: rename Interactive Explorer to /explorer.html with redirects#162

Merged
rdhyee merged 4 commits intoisamplesorg:mainfrom
rdhyee:feature/explorer-phase-5-rename
May 1, 2026
Merged

Phase 5: rename Interactive Explorer to /explorer.html with redirects#162
rdhyee merged 4 commits intoisamplesorg:mainfrom
rdhyee:feature/explorer-phase-5-rename

Conversation

@rdhyee
Copy link
Copy Markdown
Contributor

@rdhyee rdhyee commented May 1, 2026

Summary

Closes the unified-explorer migration (issue #156). Phases 1–4 (#157#160) built the unified UI on tutorials/progressive_globe.qmd. This PR promotes it to the canonical site-root URL /explorer.html and retires the old Search Explorer page.

  • Rename: tutorials/progressive_globe.qmdexplorer.qmd at site root. Asset path fixed (../assets/js/source-palette.jsassets/js/source-palette.js) so the source palette resolves on both isamples.org and PR previews at rdhyee.github.io/isamplesorg.github.io/.
  • Two redirect stubs at the old URLs (tutorials/progressive_globe.html and tutorials/isamples_explorer.html) — preview-safe, document-relative: new URL('../explorer.html' + search + hash, href). Inbound deep links from search engines, shared URLs, and Phase 1–4 test artifacts continue to resolve with query string and hash preserved.
  • _quarto.yml: navbar Interactive Explorer href → explorer.qmd; Search Explorer entry removed from both the How-to-Use menu (line 21–22) and sidebar (line 70–71).
  • Internal links updated to point at /explorer.html directly (avoid double-redirect): index.qmd, how-to-use.qmd, tutorials/index.qmd, about.qmd, data.qmd, design/index.qmd, index_alt.qmd, query-spec.qmd, tutorials/narrow_vs_wide_performance.qmd, and the existing parquet_cesium_isamples_wide redirect stub.
  • Tests: tests/test_explorer.pytests/test_globe.py targeting /explorer.html. Selectors updated for the unified DOM-based UI (#sourceFilter, #materialFilter, #contextFilter, #objectTypeFilter, #globeViewBtn/#tableViewBtn — no List view, #maxSamples number input not range slider). Unskips the cross-filter facet tests deferred in explorer: dynamic cross-filter facet counts #155 — native HTML checkboxes respond to programmatic .click(), unlike the OJS Inputs.checkbox of the old Explorer. Adds two redirect-preserves-params tests for the old URLs. test_navigation.py and test_tutorials_landing.py updated to drop Search-Explorer assertions and retarget the globe-loads test.

Verification

  • quarto render clean across the full site (39/39).
  • Local smoke test on docs/explorer.html: 0 JS exceptions, 0 console errors (one pre-existing /listings.json 404 unrelated to this PR), 0 network fails. Cesium loads, view toggle and facet sidebar render.
  • Redirect stubs: built HTML contains both window.location.replace(new URL('../explorer.html' + ...)) and <meta http-equiv="refresh" content="0; url=../explorer.html"> for the no-JS path.

Test plan

  • Cold load https://rdhyee.github.io/isamplesorg.github.io/explorer.html — globe + facets + view toggle render
  • Cold load https://rdhyee.github.io/isamplesorg.github.io/tutorials/progressive_globe.html?q=basalt&sources=SESAR#v=1&lat=37&lng=-122&alt=200000 — redirects to /explorer.html, query and hash both preserved, search auto-runs
  • Cold load https://rdhyee.github.io/isamplesorg.github.io/tutorials/isamples_explorer.html?q=pottery&view=table — redirects to /explorer.html, table view active, search auto-runs
  • Navbar Interactive Explorer link goes to /explorer.html (not /tutorials/...)
  • Search Explorer no longer appears in the How-to-Use sidebar
  • All Phase 1–4 behavior still works on the new URL: cross-filter counts, multi-term search, URL params round-trip, table refresh after off-view filter changes

Rollback

Single-PR revert restores the old URLs; Phases 1–4 remain intact since this PR is rename-only on top of them.

🤖 Generated with Claude Code

Closes the unified-explorer migration (issue isamplesorg#156). Phases 1-4 (isamplesorg#157-isamplesorg#160)
built the unified UI on tutorials/progressive_globe.qmd; this PR promotes
it to the canonical site-root URL and retires the old Search Explorer
page.

Rename + asset-path fix
- Move tutorials/progressive_globe.qmd → explorer.qmd at site root.
- Adjust source-palette import from `../assets/js/source-palette.js` to
  `assets/js/source-palette.js` so it resolves on both isamples.org and
  on rdhyee.github.io/isamplesorg.github.io PR previews.

URL param: search, not q
- The explorer's URL state now uses `?search=` instead of `?q=`. Quarto's
  site-wide search reserves `?q=` for its highlight feature and strips
  the param via history.replaceState before any of our cells run (see
  docs/site_libs/quarto-search/quarto-search.js). `?search=` is unused
  by Quarto and survives intact.

Redirect stubs at the old URLs
- tutorials/progressive_globe.html and tutorials/isamples_explorer.html
  become preview-safe redirect stubs:
    new URL('../explorer.html' + search + hash, href)
- They forward whatever query string the browser presents. Note: legacy
  `?q=basalt` URLs lose the search term because Quarto strips `?q=`
  before our stub script runs (the stub is itself a Quarto-rendered
  page, so its <head> loads quarto-search.js). Non-q params (sources,
  material, etc.) and the hash fragment all survive — the only
  affected URLs are Phase 3 dev test links that were never published.

_quarto.yml + internal links
- Navbar Interactive Explorer href → explorer.qmd. Search Explorer
  removed from both the How-to-Use menu and the sidebar.
- Update internal links to /explorer.html in index.qmd, how-to-use.qmd,
  tutorials/index.qmd, about.qmd, data.qmd, design/index.qmd,
  index_alt.qmd, query-spec.qmd, tutorials/narrow_vs_wide_performance.qmd,
  and the existing parquet_cesium_isamples_wide redirect stub.

Tests
- tests/test_explorer.py → tests/test_globe.py targeting /explorer.html.
- Selectors updated for the unified DOM-based UI: #sourceFilter,
  #materialFilter, #contextFilter, #objectTypeFilter, #globeViewBtn /
  #tableViewBtn (no List view), #maxSamples number input.
- Unskip the cross-filter facet tests deferred in isamplesorg#155 — native HTML
  checkboxes respond to programmatic .click() unlike the old Explorer's
  OJS Inputs.checkbox.
- Add redirect-preserves-params tests for both old URLs (using the
  current ?search= param, which survives Quarto's q-stripping).
- test_navigation.py + test_tutorials_landing.py drop Search Explorer
  assertions and retarget the globe-loads test to /explorer.html.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rdhyee rdhyee force-pushed the feature/explorer-phase-5-rename branch from b1fe17c to b247ae2 Compare May 1, 2026 19:25
rdhyee and others added 3 commits May 1, 2026 12:32
1. test_baseline_sesar_count_matches_summaries was racy: facet-count
   spans are present in static HTML before being populated, so
   wait_for("attached") returned immediately and the test parsed an
   empty string. Wait until the SESAR span text matches \(\d (i.e., a
   parenthesised number) before reading.

2. Drop ?maxSamples= from URL state. Phase 3 introduced it to control
   the globe POINT_BUDGET; Phase 4 added a separate #maxSamples input
   for the table cap with different defaults (5000 vs 25000) and ranges
   (1-1000000 vs 1000-100000). The two were never the same concept and
   conflating them under one URL param meant `?maxSamples=10000`
   silently affected the globe but not the visible table input, and
   table-input changes never made it back to the URL. Remove the URL
   param entirely: globe POINT_BUDGET reverts to the constant
   DEFAULT_POINT_BUDGET (5000), table input remains a UI-only control.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Follow-on to 8559b56 (Fix explorer facet dimming) which decoupled facet
counts from the search predicate. After that change, calling
refreshFacetCounts on every search keystroke / button click / Enter
triggered DB requeries that produced no visible difference (counts no
longer depend on search text). Drop those calls.

The single refreshFacetCounts() at the end of the cell (initial paint)
and the calls from facet checkbox handlers remain — those are still
load-bearing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant